/*   1:    */ package gov.sat.tax.fwsk.rz;
/*   2:    */ 
/*   3:    */ import gov.sat.tax.fwsk.common.TransFormatServlet;
/*   4:    */ import gov.sat.tax.fwsk.util.GSFpSkFpHzDataBean;
/*   5:    */ import gov.sat.tax.fwsk.wlrz.WlrzConst;
/*   6:    */ import java.io.PrintStream;
/*   7:    */ import java.sql.BatchUpdateException;
/*   8:    */ import java.sql.Connection;
/*   9:    */ import java.sql.Date;
/*  10:    */ import java.sql.ResultSet;
/*  11:    */ import java.sql.SQLException;
/*  12:    */ import java.sql.Statement;
/*  13:    */ import java.text.NumberFormat;
/*  14:    */ import java.text.SimpleDateFormat;
/*  15:    */ import java.util.ArrayList;
/*  16:    */ import java.util.List;
/*  17:    */ 
/*  18:    */ public class GSRzFpdklMxDataBean
/*  19:    */ {
/*  20:    */   private String swjg_dm;
/*  21:    */   private int rz_yf;
/*  22:    */   private String rz_nsrsbh;
/*  23:    */   private String fpdm;
/*  24:    */   private String fphm;
/*  25:    */   private Date rz_sj;
/*  26:    */   private int rz_jg;
/*  27:    */   private String fp_kprq;
/*  28:    */   private String gf_nsrsbh;
/*  29:    */   private double je;
/*  30:    */   private float sl;
/*  31:    */   private double se;
/*  32:    */   private String xf_nsrsbh;
/*  33:    */   private String fp_mw;
/*  34:    */   private String jskh;
/*  35:    */   private int rz_wxyy;
/*  36:    */   private String rz_rgjz_bz;
/*  37:    */   private int rz_fs;
/*  38:    */   private int task_id;
/*  39:    */   private String czy_dm;
/*  40:    */   private String czy_mc;
/*  41:    */   private String crcsum;
/*  42:    */   private String jglb;
/*  43: 48 */   public static double JePageHj = 0.0D;
/*  44: 49 */   public static double SePageHj = 0.0D;
/*  45:    */   private int xffs;
/*  46:    */   private double xfje;
/*  47:    */   private double xfse;
/*  48:    */   private int wtfs;
/*  49:    */   private double wtje;
/*  50:    */   private double wtse;
/*  51:    */   private int wffs;
/*  52:    */   private int ywsl;
/*  53:    */   private String gdzc_bz;
/*  54:    */   private String fp_lb;
/*  55:    */   private String ds_swjg_dm;
/*  56:    */   private String qd_bz;
/*  57: 68 */   private List wpmxs = new ArrayList();
/*  58: 70 */   private String is_Zh = "N";
/*  59:    */   public List zhLst;
/*  60:    */   
/*  61:    */   public int doInsert(Connection conn)
/*  62:    */     throws SQLException
/*  63:    */   {
/*  64: 86 */     boolean bAutoCommit = true;
/*  65: 87 */     if (conn == null) {
/*  66: 88 */       return -1;
/*  67:    */     }
/*  68: 89 */     Statement stmt = null;
/*  69: 90 */     this.rz_sj = new Date(System.currentTimeMillis());
/*  70: 91 */     SimpleDateFormat sdf = new SimpleDateFormat(
/*  71: 92 */       "yyyy-MM-dd HH:mm:ss");
/*  72: 93 */     String sj = sdf.format(this.rz_sj);
/*  73: 94 */     this.czy_mc = TransFormatServlet.GBToUnicode(this.czy_mc);
/*  74: 95 */     this.czy_dm = TransFormatServlet.GBToUnicode(this.czy_dm);
/*  75:    */     try
/*  76:    */     {
/*  77: 97 */       bAutoCommit = conn.getAutoCommit();
/*  78: 98 */       conn.setAutoCommit(false);
/*  79:    */       
/*  80:100 */       GSFpSkFpHzDataBean skfp = new GSFpSkFpHzDataBean();
/*  81:101 */       int skjg = skfp.inSkFpHz(conn, this.fpdm, this.fphm);
/*  82:102 */       System.out.println("[INFO] 失控发票比对结果.." + skjg);
/*  83:103 */       if (skjg == 1)
/*  84:    */       {
/*  85:104 */         this.rz_jg = 3;
/*  86:105 */         this.jglb = "1";
/*  87:    */       }
/*  88:107 */       if (this.rz_jg == 3)
/*  89:    */       {
/*  90:108 */         String sqlStr = "select to_char(RZ_SJ,'YYYY-MM-DD hh24:mi:ss') as RZ_SJ from htjs.RZ_FPDKL_MX where fpdm='" + 
/*  91:109 */           this.fpdm + "' and fphm='" + this.fphm + "' and rz_jg=4 ";
/*  92:110 */         stmt = conn.createStatement();
/*  93:111 */         ResultSet rs = stmt.executeQuery(sqlStr);
/*  94:113 */         if (rs.next())
/*  95:    */         {
/*  96:114 */           this.ds_swjg_dm = rs.getString("RZ_SJ");
/*  97:115 */           System.out.println("[INFO] 数据库中已有本张发票的认证后失控数据记录");
/*  98:116 */           this.rz_jg = 4;
/*  99:117 */           stmt.close();
/* 100:118 */           stmt = null;
/* 101:119 */           return 2;
/* 102:    */         }
/* 103:    */       }
/* 104:125 */       String sqlStr = "insert into HTJS.RZ_FPDKL_MX(SWJG_DM,RZ_YF,RZ_NSRSBH,FPDM,FPHM,RZ_SJ,RZ_JG,FP_KPRQ,GF_NSRSBH,JE,SL,SE,XF_NSRSBH,FP_MW,JSKH,RZ_WXYY,RZ_RGJZ_BZ,RZ_FS,TASK_ID,CZY_DM,CZY_MC,CRCSUM,JGLB,DKBZ,FP_LB,GDZC_BZ,XF_QYMC,GF_QYMC,QD_BZ) values('" + 
/* 105:126 */         this.swjg_dm + "'," + this.rz_yf + ",'" + this.rz_nsrsbh + "'";
/* 106:127 */       sqlStr = sqlStr + ",'" + this.fpdm + "','" + this.fphm + "',To_Date('" + sj + 
/* 107:128 */         "','yyyy-mm-dd hh24:mi:ss')," + this.rz_jg + ",To_Date('" + 
/* 108:129 */         this.fp_kprq + "','yyyy-mm-dd'),'" + this.gf_nsrsbh + "'";
/* 109:130 */       sqlStr = sqlStr + 
/* 110:131 */         "," + 
/* 111:132 */         this.je + 
/* 112:133 */         "," + 
/* 113:134 */         this.sl + 
/* 114:135 */         "," + 
/* 115:136 */         this.se + 
/* 116:137 */         ",'" + 
/* 117:138 */         this.xf_nsrsbh + 
/* 118:139 */         "','" + 
/* 119:140 */         this.fp_mw + 
/* 120:141 */         "','" + 
/* 121:142 */         this.jskh + 
/* 122:143 */         "'," + 
/* 123:144 */         this.rz_wxyy + 
/* 124:145 */         ",'" + 
/* 125:146 */         this.rz_rgjz_bz + 
/* 126:147 */         "'," + 
/* 127:148 */         this.rz_fs + 
/* 128:149 */         "," + 
/* 129:150 */         this.task_id + 
/* 130:151 */         ",'" + 
/* 131:152 */         this.czy_dm + 
/* 132:153 */         "','" + 
/* 133:154 */         this.czy_mc + 
/* 134:155 */         "','" + 
/* 135:156 */         this.crcsum + 
/* 136:157 */         "','" + 
/* 137:158 */         this.jglb + 
/* 138:159 */         "','N','" + 
/* 139:160 */         this.fp_lb + 
/* 140:161 */         "','" + 
/* 141:162 */         this.gdzc_bz + 
/* 142:163 */         "','" + (
/* 143:164 */         this.qd_bz.equals("Y") ? 
/* 144:165 */         TransFormatServlet.GBToUnicode((String)this.wpmxs.get(1)) : "") + 
/* 145:166 */         "','" + (
/* 146:167 */         this.qd_bz.equals("Y") ? 
/* 147:168 */         TransFormatServlet.GBToUnicode((String)this.wpmxs.get(0)) : "") + "','" + 
/* 148:169 */         this.qd_bz + "')";
/* 149:    */       
/* 150:    */ 
/* 151:    */ 
/* 152:    */ 
/* 153:    */ 
/* 154:175 */       stmt = conn.createStatement();
/* 155:176 */       stmt.addBatch(sqlStr);
/* 156:177 */       if (this.qd_bz.equals("Y"))
/* 157:    */       {
/* 158:178 */         for (int mm = 0; mm < this.wpmxs.size(); mm++) {
/* 159:179 */           System.out.print(this.wpmxs.get(mm));
/* 160:    */         }
/* 161:182 */         if (this.is_Zh.equals("Y"))
/* 162:    */         {
/* 163:183 */           List newWpmxs = new ArrayList();
/* 164:184 */           for (int index = 0; index < 3; index++) {
/* 165:186 */             newWpmxs.add(this.wpmxs.get(index));
/* 166:    */           }
						int index = 0 ;//zhanglei
/* 167:188 */           for (int i = 0; i < this.zhLst.size(); i++)
/* 168:    */           {
/* 169:189 */             int groupNum = Integer.valueOf(this.zhLst.get(i).toString())
/* 170:190 */               .intValue();
/* 171:191 */             String wpmc = "";
/* 172:192 */             String wpdw = "";
/* 173:193 */             String wpsl = "";
/* 174:194 */             for (int j = 0; j < groupNum; j++)
/* 175:    */             {
/* 176:195 */               wpmc = wpmc + this.wpmxs.get(index + j * 3).toString();
/* 177:196 */               wpdw = wpdw + this.wpmxs.get(index + j * 3 + 1).toString();
/* 178:197 */               wpsl = wpsl + this.wpmxs.get(index + j * 3 + 2).toString();
/* 179:    */             }
/* 180:199 */             newWpmxs.add(wpmc);
/* 181:200 */             newWpmxs.add(wpdw);
/* 182:201 */             newWpmxs.add(wpsl);
/* 183:202 */             index += groupNum * 3;
/* 184:    */           }
/* 185:204 */           for (int rest = index; rest < this.wpmxs.size(); rest++) {
/* 186:205 */             newWpmxs.add(this.wpmxs.get(rest));
/* 187:    */           }
/* 188:208 */           this.wpmxs = newWpmxs;
/* 189:209 */           if (WlrzConst.isDebug())
/* 190:    */           {
/* 191:210 */             System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
/* 192:211 */             for (int kkk = 0; kkk < this.wpmxs.size(); kkk++) {
/* 193:212 */               System.out.println(this.wpmxs.get(kkk));
/* 194:    */             }
/* 195:214 */             System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
/* 196:    */           }
/* 197:    */         }
/* 198:217 */         int kk = 3;
/* 199:217 */         for (int count = 1; kk < this.wpmxs.size(); count++)
/* 200:    */         {
/* 201:218 */           if (WlrzConst.isDebug())
/* 202:    */           {
/* 203:219 */             System.out.print((String)this.wpmxs.get(kk));
/* 204:220 */             System.out.print("||");
/* 205:221 */             System.out.print((String)this.wpmxs.get(kk + 1));
/* 206:222 */             System.out.print("||");
/* 207:223 */             System.out.print((String)this.wpmxs.get(kk + 2));
/* 208:224 */             System.out.println();
/* 209:    */           }
/* 210:226 */           sqlStr = 
/* 211:    */           
/* 212:    */ 
/* 213:    */ 
/* 214:    */ 
/* 215:    */ 
/* 216:    */ 
/* 217:    */ 
/* 218:    */ 
/* 219:    */ 
/* 220:    */ 
/* 221:    */ 
/* 222:    */ 
/* 223:    */ 
/* 224:    */ 
/* 225:    */ 
/* 226:    */ 
/* 227:243 */             "insert into HTJS.RZ_FPDKL_MX_QD(FPDM,FPHM,ID,WP_MC,WP_DW,SL) values('" + this.fpdm + "','" + this.fphm + "','" + count + "','" + TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk)) + "','" + TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk + 1)) + "'," + (TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk + 2)).equals("") ? "0" : TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk + 2))) + ")";
/* 228:244 */           if (WlrzConst.isDebug()) {
/* 229:245 */             System.out.println(sqlStr);
/* 230:    */           }
/* 231:246 */           stmt.addBatch(sqlStr);kk += 3;
/* 232:    */         }
/* 233:    */       }
/* 234:263 */       stmt.executeBatch();
/* 235:264 */       stmt.clearBatch();
/* 236:265 */       stmt.close();
/* 237:266 */       conn.commit();
/* 238:267 */       conn.setAutoCommit(bAutoCommit);
/* 239:    */     }
/* 240:    */     catch (BatchUpdateException e)
/* 241:    */     {
/* 242:269 */       conn.rollback();
/* 243:270 */       conn.setAutoCommit(bAutoCommit);
/* 244:271 */       stmt.close();
/* 245:272 */       String msg = e.getMessage().toUpperCase();
/* 246:274 */       if (msg.indexOf("ORA-00001") > -1)
/* 247:    */       {
/* 248:275 */         System.out.println("[INFO] 写入抵扣联异常 :违反数据表唯一性约束 重复认证");
/* 249:276 */         String sqlStr = "select to_char(RZ_SJ,'YYYY-MM-DD hh24:mi:ss') as RZ_SJ from htjs.RZ_FPDKL_MX where fpdm='" + 
/* 250:277 */           this.fpdm + "' and fphm='" + this.fphm + "'  ";
/* 251:278 */         stmt = conn.createStatement();
/* 252:279 */         ResultSet r = stmt.executeQuery(sqlStr);
/* 253:280 */         if (r.next()) {
/* 254:281 */           this.ds_swjg_dm = r.getString("RZ_SJ");
/* 255:    */         }
/* 256:283 */         stmt.close();
/* 257:284 */         r = null;
/* 258:285 */         return 2;
/* 259:    */       }
/* 260:287 */       System.out.println("[ERROR] 写入抵扣联异常 :" + e.toString());
/* 261:288 */       return 3;
/* 262:    */     }
/* 263:    */     catch (Exception e)
/* 264:    */     {
/* 265:291 */       e.printStackTrace();
/* 266:292 */       return 3;
/* 267:    */     }
/* 268:    */     String sqlStr;
/* 269:295 */     return 1;
/* 270:    */   }
/* 271:    */   
/* 272:    */   public int doInserPvoice(Connection conn)
/* 273:    */     throws SQLException
/* 274:    */   {
/* 275:303 */     String sqlStr = null;
/* 276:304 */     if (conn == null) {
/* 277:305 */       return -1;
/* 278:    */     }
/* 279:306 */     boolean bAutoCommit = conn.getAutoCommit();
/* 280:307 */     Statement stmt = null;
/* 281:308 */     int count = 0;
/* 282:309 */     this.rz_sj = new Date(System.currentTimeMillis());
/* 283:310 */     SimpleDateFormat sdf = new SimpleDateFormat(
/* 284:311 */       "yyyy-MM-dd HH:mm:ss");
/* 285:312 */     String sj = sdf.format(this.rz_sj);
/* 286:313 */     this.czy_mc = TransFormatServlet.GBToUnicode(this.czy_mc);
/* 287:314 */     this.czy_dm = TransFormatServlet.GBToUnicode(this.czy_dm);
/* 288:    */     try
/* 289:    */     {
/* 290:318 */       sqlStr = 
/* 291:319 */         "insert into HTJS.RZ_FDKFP_YZ_MX(SWJG_DM,RZ_YF,YZ_NSRSBH,FPDM,FPHM,RZ_SJ,RZ_JG,FP_KPRQ,GF_NSRSBH,JE,SL,SE,XF_NSRSBH,FP_MW,JSKH,RZ_WXYY,RZ_RGJZ_BZ,RZ_FS,CZY_DM,CZY_MC,JGLB,FP_LB,NSR_XZ,XF_QYMC,GF_QYMC,QD_BZ) values('" + this.swjg_dm + "'," + this.rz_yf + ",'" + this.rz_nsrsbh + "'";
/* 292:320 */       sqlStr = sqlStr + ",'" + this.fpdm + "','" + this.fphm + "',To_Date('" + sj + 
/* 293:321 */         "','yyyy-mm-dd hh24:mi:ss')," + this.rz_jg + ",To_Date('" + 
/* 294:322 */         this.fp_kprq + "','yyyy-mm-dd'),'" + this.gf_nsrsbh + "'";
/* 295:323 */       sqlStr = sqlStr + 
/* 296:324 */         "," + 
/* 297:325 */         this.je + 
/* 298:326 */         "," + 
/* 299:327 */         this.sl + 
/* 300:328 */         "," + 
/* 301:329 */         this.se + 
/* 302:330 */         ",'" + 
/* 303:331 */         this.xf_nsrsbh + 
/* 304:332 */         "','" + 
/* 305:333 */         this.fp_mw + 
/* 306:334 */         "','" + 
/* 307:335 */         this.jskh + 
/* 308:336 */         "'," + 
/* 309:337 */         this.rz_wxyy + 
/* 310:338 */         ",'" + 
/* 311:339 */         this.rz_rgjz_bz + 
/* 312:340 */         "'," + 
/* 313:341 */         this.rz_fs + 
/* 314:342 */         ",'" + 
/* 315:343 */         this.czy_dm + 
/* 316:344 */         "','" + 
/* 317:345 */         this.czy_mc + 
/* 318:346 */         "','" + 
/* 319:347 */         this.jglb + 
/* 320:348 */         "','" + 
/* 321:349 */         this.fp_lb + 
/* 322:350 */         "'," + 
/* 323:351 */         count + 
/* 324:352 */         ",'" + (
/* 325:353 */         this.qd_bz.equals("Y") ? 
/* 326:354 */         TransFormatServlet.GBToUnicode((String)this.wpmxs.get(1)) : "") + 
/* 327:355 */         "','" + (
/* 328:356 */         this.qd_bz.equals("Y") ? 
/* 329:357 */         TransFormatServlet.GBToUnicode((String)this.wpmxs.get(0)) : "") + "','" + 
/* 330:358 */         this.qd_bz + "')";
/* 331:    */       
/* 332:    */ 
/* 333:361 */       stmt = conn.createStatement();
/* 334:362 */       stmt.addBatch(sqlStr);
/* 335:363 */       if (this.qd_bz.equals("Y"))
/* 336:    */       {
/* 337:379 */         if (WlrzConst.isDebug()) {
/* 338:380 */           for (int mm = 0; mm < this.wpmxs.size(); mm++) {
/* 339:381 */             System.out.print(this.wpmxs.get(mm));
/* 340:    */           }
/* 341:    */         }
/* 342:386 */         if (this.is_Zh.equals("Y"))
/* 343:    */         {
/* 344:387 */           List newWpmxs = new ArrayList();
/* 345:388 */           for (int index = 0; index < 2; index++) {
/* 346:390 */             newWpmxs.add(this.wpmxs.get(index));
/* 347:    */           }
/* 348:393 */           newWpmxs.add(String.valueOf(this.zhLst.size()));
						int index = 0;//edit by zhanglei
/* 349:395 */           for (int i = 0; i < this.zhLst.size(); i++)
/* 350:    */           {
/* 351:396 */             int groupNum = Integer.valueOf(this.zhLst.get(i).toString())
/* 352:397 */               .intValue();
/* 353:398 */             String wpmc = "";
/* 354:399 */             String wpdw = "";
/* 355:400 */             String wpsl = "";
						  
/* 356:401 */             for (int j = 0; j < groupNum; j++)
/* 357:    */             {
/* 358:402 */               wpmc = wpmc + this.wpmxs.get(index + j * 3).toString();
/* 359:403 */               wpdw = wpdw + this.wpmxs.get(index + j * 3 + 1).toString();
/* 360:404 */               wpsl = wpsl + this.wpmxs.get(index + j * 3 + 2).toString();
/* 361:    */             }
/* 362:406 */             newWpmxs.add(wpmc);
/* 363:407 */             newWpmxs.add(wpdw);
/* 364:408 */             newWpmxs.add(wpsl);
/* 365:409 */             index += groupNum * 3;
/* 366:    */           }
/* 367:411 */           for (int rest = index; rest < this.wpmxs.size(); rest++) {
/* 368:412 */             newWpmxs.add(this.wpmxs.get(rest));
/* 369:    */           }
/* 370:415 */           this.wpmxs = newWpmxs;
/* 371:417 */           if (WlrzConst.isDebug())
/* 372:    */           {
/* 373:418 */             System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
/* 374:419 */             for (int kkk = 0; kkk < this.wpmxs.size(); kkk++) {
/* 375:420 */               System.out.println(this.wpmxs.get(kkk));
/* 376:    */             }
/* 377:422 */             System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
/* 378:    */           }
/* 379:    */         }
/* 380:425 */         int kk = 3;
/* 381:425 */         for (int countNum = 1; kk < this.wpmxs.size(); countNum++)
/* 382:    */         {
/* 383:426 */           if (WlrzConst.isDebug())
/* 384:    */           {
/* 385:427 */             System.out.print((String)this.wpmxs.get(kk));
/* 386:428 */             System.out.print("||");
/* 387:429 */             System.out.print((String)this.wpmxs.get(kk + 1));
/* 388:430 */             System.out.print("||");
/* 389:431 */             System.out.print((String)this.wpmxs.get(kk + 2));
/* 390:432 */             System.out.println();
/* 391:    */           }
/* 392:435 */           sqlStr = 
/* 393:    */           
/* 394:    */ 
/* 395:    */ 
/* 396:    */ 
/* 397:    */ 
/* 398:    */ 
/* 399:    */ 
/* 400:    */ 
/* 401:    */ 
/* 402:    */ 
/* 403:    */ 
/* 404:    */ 
/* 405:    */ 
/* 406:    */ 
/* 407:    */ 
/* 408:    */ 
/* 409:452 */             "insert into HTJS.RZ_FDKFP_YZ_MX_QD(FPDM,FPHM,ID,WP_MC,WP_DW,SL) values('" + this.fpdm + "','" + this.fphm + "','" + countNum + "','" + TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk)) + "','" + TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk + 1)) + "'," + (TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk + 2)).equals("") ? "0" : TransFormatServlet.GBToUnicode((String)this.wpmxs.get(kk + 2))) + ")";
/* 410:453 */           if (WlrzConst.isDebug()) {
/* 411:454 */             System.out.println(sqlStr);
/* 412:    */           }
/* 413:455 */           stmt.addBatch(sqlStr);kk += 3;
/* 414:    */         }
/* 415:    */       }
/* 416:458 */       stmt.executeBatch();
/* 417:459 */       stmt.clearBatch();
/* 418:460 */       stmt.close();
/* 419:461 */       conn.commit();
/* 420:462 */       conn.setAutoCommit(bAutoCommit);
/* 421:    */     }
/* 422:    */     catch (BatchUpdateException e)
/* 423:    */     {
/* 424:464 */       conn.rollback();
/* 425:465 */       conn.setAutoCommit(bAutoCommit);
/* 426:466 */       stmt.close();
/* 427:467 */       String msg = e.getMessage().toUpperCase();
/* 428:468 */       if (msg.indexOf("ORA-00001") > -1)
/* 429:    */       {
/* 430:470 */         conn.rollback();
/* 431:471 */         conn.setAutoCommit(bAutoCommit);
/* 432:472 */         stmt.close();
/* 433:473 */         System.out.println("[INFO] 写入普通抵扣联异常 :违反数据表唯一性约束 重复认证");
/* 434:474 */         sqlStr = "select to_char(RZ_SJ,'YYYY-MM-DD hh24:mi:ss') as RZ_SJ from htjs.RZ_FDKFP_YZ_MX where fpdm='" + 
/* 435:475 */           this.fpdm + "' and fphm='" + this.fphm + "'  ";
/* 436:476 */         stmt = conn.createStatement();
/* 437:477 */         ResultSet r = stmt.executeQuery(sqlStr);
/* 438:478 */         if (r.next()) {
/* 439:479 */           this.ds_swjg_dm = r.getString("RZ_SJ");
/* 440:    */         }
/* 441:481 */         stmt.close();
/* 442:482 */         r = null;
/* 443:483 */         return 2;
/* 444:    */       }
/* 445:485 */       System.out.println("[ERROR] 写入抵扣联异常 :" + e.toString());
/* 446:486 */       return 3;
/* 447:    */     }
/* 448:489 */     return 1;
/* 449:    */   }
/* 450:    */   
/* 451:    */   public String getCrcsum()
/* 452:    */   {
/* 453:493 */     return this.crcsum;
/* 454:    */   }
/* 455:    */   
/* 456:    */   public String getCzy_Dm()
/* 457:    */   {
/* 458:497 */     return this.czy_dm;
/* 459:    */   }
/* 460:    */   
/* 461:    */   public String getCzy_Mc()
/* 462:    */   {
/* 463:501 */     return this.czy_mc;
/* 464:    */   }
/* 465:    */   
/* 466:    */   public String getFp_Kprq()
/* 467:    */   {
/* 468:505 */     return this.fp_kprq;
/* 469:    */   }
/* 470:    */   
/* 471:    */   public String getFp_Mw()
/* 472:    */   {
/* 473:509 */     return this.fp_mw;
/* 474:    */   }
/* 475:    */   
/* 476:    */   public String getFpdm()
/* 477:    */   {
/* 478:513 */     return this.fpdm;
/* 479:    */   }
/* 480:    */   
/* 481:    */   public String getFphm()
/* 482:    */   {
/* 483:517 */     this.fphm = ("00000000" + this.fphm);
/* 484:518 */     this.fphm = this.fphm.substring(this.fphm.length() - 8);
/* 485:519 */     return this.fphm;
/* 486:    */   }
/* 487:    */   
/* 488:    */   public String getGf_Nsrsbh()
/* 489:    */   {
/* 490:523 */     return this.gf_nsrsbh;
/* 491:    */   }
/* 492:    */   
/* 493:    */   public double getJe()
/* 494:    */   {
/* 495:527 */     return this.je;
/* 496:    */   }
/* 497:    */   
/* 498:    */   public String getJePageHj()
/* 499:    */   {
/* 500:531 */     NumberFormat nf = NumberFormat.getInstance();
/* 501:532 */     nf.setGroupingUsed(false);
/* 502:533 */     nf.setMinimumFractionDigits(2);
/* 503:534 */     nf.setMaximumFractionDigits(2);
/* 504:535 */     return nf.format(JePageHj);
/* 505:    */   }
/* 506:    */   
/* 507:    */   public String getJes()
/* 508:    */   {
/* 509:539 */     NumberFormat nf = NumberFormat.getInstance();
/* 510:540 */     nf.setGroupingUsed(false);
/* 511:541 */     nf.setMinimumFractionDigits(2);
/* 512:542 */     nf.setMaximumFractionDigits(2);
/* 513:543 */     return nf.format(this.je);
/* 514:    */   }
/* 515:    */   
/* 516:    */   public String getJglb()
/* 517:    */   {
/* 518:547 */     return this.jglb;
/* 519:    */   }
/* 520:    */   
/* 521:    */   public String getJskh()
/* 522:    */   {
/* 523:551 */     return this.jskh;
/* 524:    */   }
/* 525:    */   
/* 526:    */   public int getRz_Fs()
/* 527:    */   {
/* 528:555 */     return this.rz_fs;
/* 529:    */   }
/* 530:    */   
/* 531:    */   public String getRz_FsStr()
/* 532:    */   {
/* 533:559 */     switch (this.rz_fs)
/* 534:    */     {
/* 535:    */     case 1: 
/* 536:561 */       return "自动扫描";
/* 537:    */     case 2: 
/* 538:563 */       return "CCD扫描";
/* 539:    */     case 3: 
/* 540:565 */       return "手工录入";
/* 541:    */     case 4: 
/* 542:567 */       return "软盘采集";
/* 543:    */     case 5: 
/* 544:569 */       return "网上认证";
/* 545:    */     }
/* 546:571 */     return "未知方式";
/* 547:    */   }
/* 548:    */   
/* 549:    */   public int getRz_Jg()
/* 550:    */   {
/* 551:576 */     return this.rz_jg;
/* 552:    */   }
/* 553:    */   
/* 554:    */   public String getRz_JgStr()
/* 555:    */   {
/* 556:580 */     switch (this.rz_jg)
/* 557:    */     {
/* 558:    */     case 0: 
/* 559:582 */       return "认证相符";
/* 560:    */     case 1: 
/* 561:584 */       return "认证不符";
/* 562:    */     case 2: 
/* 563:586 */       return "重复认证";
/* 564:    */     case 3: 
/* 565:588 */       return "认证时失控";
/* 566:    */     case 4: 
/* 567:590 */       return "认证后失控";
/* 568:    */     case 5: 
/* 569:592 */       return "密文有误";
/* 570:    */     }
/* 571:594 */     return "无法认证";
/* 572:    */   }
/* 573:    */   
/* 574:    */   public String getRz_Nsrsbh()
/* 575:    */   {
/* 576:599 */     return this.rz_nsrsbh;
/* 577:    */   }
/* 578:    */   
/* 579:    */   public String getRz_Rgjz_Bz()
/* 580:    */   {
/* 581:603 */     return this.rz_rgjz_bz;
/* 582:    */   }
/* 583:    */   
/* 584:    */   public Date getRz_Sj()
/* 585:    */   {
/* 586:607 */     return this.rz_sj;
/* 587:    */   }
/* 588:    */   
/* 589:    */   public int getRz_Wxyy()
/* 590:    */   {
/* 591:611 */     return this.rz_wxyy;
/* 592:    */   }
/* 593:    */   
/* 594:    */   public String getRz_WxyyS()
/* 595:    */   {
/* 596:615 */     ArrayList y_list = new ArrayList();
/* 597:616 */     ArrayList awTransNo = new ArrayList();
/* 598:    */     
/* 599:618 */     awTransNo.add("0");
/* 600:619 */     awTransNo.add("0");
/* 601:620 */     awTransNo.add("1");
/* 602:621 */     awTransNo.add("3");
/* 603:622 */     awTransNo.add("2");
/* 604:623 */     awTransNo.add("4");
/* 605:624 */     awTransNo.add("7");
/* 606:625 */     awTransNo.add("5");
/* 607:626 */     awTransNo.add("8");
/* 608:627 */     awTransNo.add("6");
/* 609:    */     
/* 610:629 */     y_list.add("密文");
/* 611:630 */     y_list.add("代码");
/* 612:631 */     y_list.add("日期");
/* 613:632 */     y_list.add("号码");
/* 614:633 */     y_list.add("购方");
/* 615:634 */     y_list.add("金额");
/* 616:635 */     y_list.add("税额");
/* 617:636 */     y_list.add("销方");
/* 618:637 */     y_list.add("税率");
/* 619:638 */     y_list.add("");
/* 620:    */     
/* 621:640 */     String szline = "";
/* 622:641 */     if ((this.rz_wxyy & 0x80) > 0) {
/* 623:642 */       szline = szline + "密文";
/* 624:643 */     } else if (this.rz_wxyy == 127) {
/* 625:644 */       szline = szline + "全部七项";
/* 626:    */     } else {
/* 627:647 */       for (int i = 1; i < 10; i++)
/* 628:    */       {
/* 629:648 */         String tem = (String)awTransNo.get(i);
/* 630:649 */         if ((Integer.parseInt(tem) >= 1) && (Integer.parseInt(tem) <= 7))
/* 631:    */         {
/* 632:651 */           int ti = 7 - Integer.parseInt(tem);
/* 633:652 */           if ((this.rz_wxyy & 1 << ti) > 0)
/* 634:    */           {
/* 635:653 */             if (!szline.equals("")) {
/* 636:654 */               szline = szline + ",";
/* 637:    */             }
/* 638:655 */             szline = 
/* 639:656 */               szline + (String)y_list.get(Integer.parseInt(tem));
/* 640:    */           }
/* 641:    */         }
/* 642:    */       }
/* 643:    */     }
/* 644:660 */     return szline;
/* 645:    */   }
/* 646:    */   
/* 647:    */   public int getRz_Yf()
/* 648:    */   {
/* 649:664 */     return this.rz_yf;
/* 650:    */   }
/* 651:    */   
/* 652:    */   public String getRz_Yf_Str()
/* 653:    */   {
/* 654:669 */     String str = Integer.toString((this.rz_yf >> 4) + 1900);
/* 655:670 */     str = str + "年";
/* 656:671 */     str = str + Integer.toString(this.rz_yf & 0xF) + "月";
/* 657:672 */     return str;
/* 658:    */   }
/* 659:    */   
/* 660:    */   public double getSe()
/* 661:    */   {
/* 662:676 */     return this.se;
/* 663:    */   }
/* 664:    */   
/* 665:    */   public String getSePageHj()
/* 666:    */   {
/* 667:680 */     NumberFormat nf = NumberFormat.getInstance();
/* 668:681 */     nf.setGroupingUsed(false);
/* 669:682 */     nf.setMinimumFractionDigits(2);
/* 670:683 */     nf.setMaximumFractionDigits(2);
/* 671:684 */     return nf.format(SePageHj);
/* 672:    */   }
/* 673:    */   
/* 674:    */   public String getSes()
/* 675:    */   {
/* 676:688 */     NumberFormat nf = NumberFormat.getInstance();
/* 677:689 */     nf.setGroupingUsed(false);
/* 678:690 */     nf.setMinimumFractionDigits(2);
/* 679:691 */     nf.setMaximumFractionDigits(2);
/* 680:692 */     return nf.format(this.se);
/* 681:    */   }
/* 682:    */   
/* 683:    */   public double getSl()
/* 684:    */   {
/* 685:696 */     return this.sl;
/* 686:    */   }
/* 687:    */   
/* 688:    */   public String getSwjg_Dm()
/* 689:    */   {
/* 690:700 */     return this.swjg_dm;
/* 691:    */   }
/* 692:    */   
/* 693:    */   public int getTask_Id()
/* 694:    */   {
/* 695:704 */     return this.task_id;
/* 696:    */   }
/* 697:    */   
/* 698:    */   public int getWffs()
/* 699:    */   {
/* 700:708 */     return this.wffs;
/* 701:    */   }
/* 702:    */   
/* 703:    */   public int getWtfs()
/* 704:    */   {
/* 705:712 */     return this.wtfs;
/* 706:    */   }
/* 707:    */   
/* 708:    */   public String getWtje()
/* 709:    */   {
/* 710:716 */     NumberFormat nf = NumberFormat.getInstance();
/* 711:717 */     nf.setGroupingUsed(false);
/* 712:718 */     nf.setMinimumFractionDigits(2);
/* 713:719 */     nf.setMaximumFractionDigits(2);
/* 714:720 */     return nf.format(this.wtje);
/* 715:    */   }
/* 716:    */   
/* 717:    */   public String getWtse()
/* 718:    */   {
/* 719:724 */     NumberFormat nf = NumberFormat.getInstance();
/* 720:725 */     nf.setGroupingUsed(false);
/* 721:726 */     nf.setMinimumFractionDigits(2);
/* 722:727 */     nf.setMaximumFractionDigits(2);
/* 723:728 */     return nf.format(this.wtse);
/* 724:    */   }
/* 725:    */   
/* 726:    */   public String getXf_Nsrsbh()
/* 727:    */   {
/* 728:732 */     return this.xf_nsrsbh;
/* 729:    */   }
/* 730:    */   
/* 731:    */   public int getXffs()
/* 732:    */   {
/* 733:736 */     return this.xffs;
/* 734:    */   }
/* 735:    */   
/* 736:    */   public String getXfje()
/* 737:    */   {
/* 738:740 */     NumberFormat nf = NumberFormat.getInstance();
/* 739:741 */     nf.setGroupingUsed(false);
/* 740:742 */     nf.setMinimumFractionDigits(2);
/* 741:743 */     nf.setMaximumFractionDigits(2);
/* 742:744 */     return nf.format(this.xfje);
/* 743:    */   }
/* 744:    */   
/* 745:    */   public String getXfse()
/* 746:    */   {
/* 747:748 */     NumberFormat nf = NumberFormat.getInstance();
/* 748:749 */     nf.setGroupingUsed(false);
/* 749:750 */     nf.setMinimumFractionDigits(2);
/* 750:751 */     nf.setMaximumFractionDigits(2);
/* 751:752 */     return nf.format(this.xfse);
/* 752:    */   }
/* 753:    */   
/* 754:    */   public int getYwsl()
/* 755:    */   {
/* 756:756 */     return this.ywsl;
/* 757:    */   }
/* 758:    */   
/* 759:    */   public void setCrcsum(String newval)
/* 760:    */   {
/* 761:760 */     this.crcsum = newval;
/* 762:    */   }
/* 763:    */   
/* 764:    */   public void setCzy_Dm(String newval)
/* 765:    */   {
/* 766:764 */     this.czy_dm = newval;
/* 767:    */   }
/* 768:    */   
/* 769:    */   public void setCzy_Mc(String newval)
/* 770:    */   {
/* 771:768 */     this.czy_mc = newval;
/* 772:    */   }
/* 773:    */   
/* 774:    */   public void setFp_Kprq(String newval)
/* 775:    */   {
/* 776:772 */     this.fp_kprq = newval;
/* 777:    */   }
/* 778:    */   
/* 779:    */   public void setFp_Mw(String newval)
/* 780:    */   {
/* 781:776 */     this.fp_mw = newval;
/* 782:    */   }
/* 783:    */   
/* 784:    */   public void setFpdm(String newval)
/* 785:    */   {
/* 786:780 */     this.fpdm = newval;
/* 787:    */   }
/* 788:    */   
/* 789:    */   public void setFphm(String newval)
/* 790:    */   {
/* 791:784 */     this.fphm = newval;
/* 792:    */   }
/* 793:    */   
/* 794:    */   public void setGf_Nsrsbh(String newval)
/* 795:    */   {
/* 796:788 */     this.gf_nsrsbh = newval;
/* 797:    */   }
/* 798:    */   
/* 799:    */   public void setJe(double newval)
/* 800:    */   {
/* 801:792 */     this.je = newval;
/* 802:    */   }
/* 803:    */   
/* 804:    */   public void setJglb(String newval)
/* 805:    */   {
/* 806:796 */     this.jglb = newval;
/* 807:    */   }
/* 808:    */   
/* 809:    */   public void setJskh(String newval)
/* 810:    */   {
/* 811:800 */     this.jskh = newval;
/* 812:    */   }
/* 813:    */   
/* 814:    */   public void setRz_Fs(int newval)
/* 815:    */   {
/* 816:804 */     this.rz_fs = newval;
/* 817:    */   }
/* 818:    */   
/* 819:    */   public void setRz_Jg(int newval)
/* 820:    */   {
/* 821:808 */     this.rz_jg = newval;
/* 822:    */   }
/* 823:    */   
/* 824:    */   public void setRz_Nsrsbh(String newval)
/* 825:    */   {
/* 826:812 */     this.rz_nsrsbh = newval;
/* 827:    */   }
/* 828:    */   
/* 829:    */   public void setRz_Rgjz_Bz(String newval)
/* 830:    */   {
/* 831:816 */     this.rz_rgjz_bz = newval;
/* 832:    */   }
/* 833:    */   
/* 834:    */   public void setRz_Sj(Date newval)
/* 835:    */   {
/* 836:820 */     this.rz_sj = newval;
/* 837:    */   }
/* 838:    */   
/* 839:    */   public void setRz_Wxyy(int newval)
/* 840:    */   {
/* 841:824 */     this.rz_wxyy = newval;
/* 842:    */   }
/* 843:    */   
/* 844:    */   public void setRz_Yf(int newval)
/* 845:    */   {
/* 846:828 */     this.rz_yf = newval;
/* 847:    */   }
/* 848:    */   
/* 849:    */   public void setSe(double newval)
/* 850:    */   {
/* 851:832 */     this.se = newval;
/* 852:    */   }
/* 853:    */   
/* 854:    */   public void setSl(float newval)
/* 855:    */   {
/* 856:836 */     this.sl = newval;
/* 857:    */   }
/* 858:    */   
/* 859:    */   public void setSwjg_Dm(String newval)
/* 860:    */   {
/* 861:840 */     this.swjg_dm = newval;
/* 862:    */   }
/* 863:    */   
/* 864:    */   public void setTask_Id(int newval)
/* 865:    */   {
/* 866:844 */     this.task_id = newval;
/* 867:    */   }
/* 868:    */   
/* 869:    */   public void setWffs(int newWffs)
/* 870:    */   {
/* 871:848 */     this.wffs = newWffs;
/* 872:    */   }
/* 873:    */   
/* 874:    */   public void setWtfs(int newWtfs)
/* 875:    */   {
/* 876:852 */     this.wtfs = newWtfs;
/* 877:    */   }
/* 878:    */   
/* 879:    */   public void setWtje(double newWtje)
/* 880:    */   {
/* 881:856 */     this.wtje = newWtje;
/* 882:    */   }
/* 883:    */   
/* 884:    */   public void setWtse(double newWtse)
/* 885:    */   {
/* 886:860 */     this.wtse = newWtse;
/* 887:    */   }
/* 888:    */   
/* 889:    */   public void setXf_Nsrsbh(String newval)
/* 890:    */   {
/* 891:864 */     this.xf_nsrsbh = newval;
/* 892:    */   }
/* 893:    */   
/* 894:    */   public void setXffs(int newXffs)
/* 895:    */   {
/* 896:868 */     this.xffs = newXffs;
/* 897:    */   }
/* 898:    */   
/* 899:    */   public void setXfje(double newXfje)
/* 900:    */   {
/* 901:872 */     this.xfje = newXfje;
/* 902:    */   }
/* 903:    */   
/* 904:    */   public void setXfse(double newXfse)
/* 905:    */   {
/* 906:876 */     this.xfse = newXfse;
/* 907:    */   }
/* 908:    */   
/* 909:    */   public void setYwsl(int newYwsl)
/* 910:    */   {
/* 911:880 */     this.ywsl = newYwsl;
/* 912:    */   }
/* 913:    */   
/* 914:    */   public void setFp_lb(String newval)
/* 915:    */   {
/* 916:884 */     this.fp_lb = newval;
/* 917:    */   }
/* 918:    */   
/* 919:    */   public String getFp_lbs()
/* 920:    */   {
/* 921:890 */     if ((this.fp_lb == null) || (this.fp_lb.length() == 0)) {
/* 922:891 */       return "无此类别";
/* 923:    */     }
/* 924:892 */     if (this.fp_lb.equals("YB")) {
/* 925:893 */       return "一般增值税发票";
/* 926:    */     }
/* 927:894 */     if (this.fp_lb.equals("FJ")) {
/* 928:895 */       return "废旧物资发票";
/* 929:    */     }
/* 930:896 */     if (this.fp_lb.equals("DK")) {
/* 931:897 */       return "小规模代开发票";
/* 932:    */     }
/* 933:898 */     return "无此类别";
/* 934:    */   }
/* 935:    */   
/* 936:    */   public String getGdzc_bz()
/* 937:    */   {
/* 938:902 */     return this.gdzc_bz;
/* 939:    */   }
/* 940:    */   
/* 941:    */   public String getGdzc_bzs()
/* 942:    */   {
/* 943:907 */     if ((this.gdzc_bz == null) || (this.gdzc_bz.length() == 0)) {
/* 944:908 */       return "非固定资产发票";
/* 945:    */     }
/* 946:909 */     if (this.gdzc_bz.equals("Y")) {
/* 947:910 */       return "固定资产发票";
/* 948:    */     }
/* 949:911 */     if (this.gdzc_bz.equals("N")) {
/* 950:912 */       return "非固定资产发票";
/* 951:    */     }
/* 952:913 */     return "非固定资产发票";
/* 953:    */   }
/* 954:    */   
/* 955:    */   public void setGdzc_bz(String string)
/* 956:    */   {
/* 957:920 */     this.gdzc_bz = string;
/* 958:    */   }
/* 959:    */   
/* 960:    */   public String getDs_swjg_dm()
/* 961:    */   {
/* 962:927 */     return this.ds_swjg_dm;
/* 963:    */   }
/* 964:    */   
/* 965:    */   public void setDs_swjg_dm(String string)
/* 966:    */   {
/* 967:934 */     this.ds_swjg_dm = string;
/* 968:    */   }
/* 969:    */   
/* 970:    */   public String getQd_bz()
/* 971:    */   {
/* 972:938 */     return this.qd_bz;
/* 973:    */   }
/* 974:    */   
/* 975:    */   public void setQd_bz(String qd_bz)
/* 976:    */   {
/* 977:942 */     this.qd_bz = qd_bz;
/* 978:    */   }
/* 979:    */   
/* 980:    */   public List getWpmxs()
/* 981:    */   {
/* 982:946 */     return this.wpmxs;
/* 983:    */   }
/* 984:    */   
/* 985:    */   public void setWpmxs(List wpmxs)
/* 986:    */   {
/* 987:950 */     this.wpmxs = wpmxs;
/* 988:    */   }
/* 989:    */   
/* 990:    */   public String getIs_Zh()
/* 991:    */   {
/* 992:954 */     return this.is_Zh;
/* 993:    */   }
/* 994:    */   
/* 995:    */   public void setIs_Zh(String isZh)
/* 996:    */   {
/* 997:958 */     this.is_Zh = isZh;
/* 998:    */   }
/* 999:    */   
/* :00:    */   public List getZhLst()
/* :01:    */   {
/* :02:962 */     return this.zhLst;
/* :03:    */   }
/* :04:    */   
/* :05:    */   public void setZhLst(List zhLst)
/* :06:    */   {
/* :07:966 */     this.zhLst = zhLst;
/* :08:    */   }
/* :09:    */ }


/* Location:           D:\htjs\document\wsrz\WsrzEjbInf\
 * Qualified Name:     gov.sat.tax.fwsk.rz.GSRzFpdklMxDataBean
 * JD-Core Version:    0.7.0.1
 */